package com.chenxingnet.dto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class AfterExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AfterExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andAidIsNull() {
            addCriterion("aId is null");
            return (Criteria) this;
        }

        public Criteria andAidIsNotNull() {
            addCriterion("aId is not null");
            return (Criteria) this;
        }

        public Criteria andAidEqualTo(Integer value) {
            addCriterion("aId =", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidNotEqualTo(Integer value) {
            addCriterion("aId <>", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidGreaterThan(Integer value) {
            addCriterion("aId >", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidGreaterThanOrEqualTo(Integer value) {
            addCriterion("aId >=", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidLessThan(Integer value) {
            addCriterion("aId <", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidLessThanOrEqualTo(Integer value) {
            addCriterion("aId <=", value, "aid");
            return (Criteria) this;
        }

        public Criteria andAidIn(List<Integer> values) {
            addCriterion("aId in", values, "aid");
            return (Criteria) this;
        }

        public Criteria andAidNotIn(List<Integer> values) {
            addCriterion("aId not in", values, "aid");
            return (Criteria) this;
        }

        public Criteria andAidBetween(Integer value1, Integer value2) {
            addCriterion("aId between", value1, value2, "aid");
            return (Criteria) this;
        }

        public Criteria andAidNotBetween(Integer value1, Integer value2) {
            addCriterion("aId not between", value1, value2, "aid");
            return (Criteria) this;
        }

        public Criteria andAnameIsNull() {
            addCriterion("aName is null");
            return (Criteria) this;
        }

        public Criteria andAnameIsNotNull() {
            addCriterion("aName is not null");
            return (Criteria) this;
        }

        public Criteria andAnameEqualTo(String value) {
            addCriterion("aName =", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameNotEqualTo(String value) {
            addCriterion("aName <>", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameGreaterThan(String value) {
            addCriterion("aName >", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameGreaterThanOrEqualTo(String value) {
            addCriterion("aName >=", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameLessThan(String value) {
            addCriterion("aName <", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameLessThanOrEqualTo(String value) {
            addCriterion("aName <=", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameLike(String value) {
            addCriterion("aName like", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameNotLike(String value) {
            addCriterion("aName not like", value, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameIn(List<String> values) {
            addCriterion("aName in", values, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameNotIn(List<String> values) {
            addCriterion("aName not in", values, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameBetween(String value1, String value2) {
            addCriterion("aName between", value1, value2, "aname");
            return (Criteria) this;
        }

        public Criteria andAnameNotBetween(String value1, String value2) {
            addCriterion("aName not between", value1, value2, "aname");
            return (Criteria) this;
        }

        public Criteria andAphoneIsNull() {
            addCriterion("aPhone is null");
            return (Criteria) this;
        }

        public Criteria andAphoneIsNotNull() {
            addCriterion("aPhone is not null");
            return (Criteria) this;
        }

        public Criteria andAphoneEqualTo(String value) {
            addCriterion("aPhone =", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneNotEqualTo(String value) {
            addCriterion("aPhone <>", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneGreaterThan(String value) {
            addCriterion("aPhone >", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneGreaterThanOrEqualTo(String value) {
            addCriterion("aPhone >=", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneLessThan(String value) {
            addCriterion("aPhone <", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneLessThanOrEqualTo(String value) {
            addCriterion("aPhone <=", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneLike(String value) {
            addCriterion("aPhone like", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneNotLike(String value) {
            addCriterion("aPhone not like", value, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneIn(List<String> values) {
            addCriterion("aPhone in", values, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneNotIn(List<String> values) {
            addCriterion("aPhone not in", values, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneBetween(String value1, String value2) {
            addCriterion("aPhone between", value1, value2, "aphone");
            return (Criteria) this;
        }

        public Criteria andAphoneNotBetween(String value1, String value2) {
            addCriterion("aPhone not between", value1, value2, "aphone");
            return (Criteria) this;
        }

        public Criteria andAsiteIsNull() {
            addCriterion("aSite is null");
            return (Criteria) this;
        }

        public Criteria andAsiteIsNotNull() {
            addCriterion("aSite is not null");
            return (Criteria) this;
        }

        public Criteria andAsiteEqualTo(String value) {
            addCriterion("aSite =", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteNotEqualTo(String value) {
            addCriterion("aSite <>", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteGreaterThan(String value) {
            addCriterion("aSite >", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteGreaterThanOrEqualTo(String value) {
            addCriterion("aSite >=", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteLessThan(String value) {
            addCriterion("aSite <", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteLessThanOrEqualTo(String value) {
            addCriterion("aSite <=", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteLike(String value) {
            addCriterion("aSite like", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteNotLike(String value) {
            addCriterion("aSite not like", value, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteIn(List<String> values) {
            addCriterion("aSite in", values, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteNotIn(List<String> values) {
            addCriterion("aSite not in", values, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteBetween(String value1, String value2) {
            addCriterion("aSite between", value1, value2, "asite");
            return (Criteria) this;
        }

        public Criteria andAsiteNotBetween(String value1, String value2) {
            addCriterion("aSite not between", value1, value2, "asite");
            return (Criteria) this;
        }

        public Criteria andApubdateIsNull() {
            addCriterion("aPubdate is null");
            return (Criteria) this;
        }

        public Criteria andApubdateIsNotNull() {
            addCriterion("aPubdate is not null");
            return (Criteria) this;
        }

        public Criteria andApubdateEqualTo(Date value) {
            addCriterion("aPubdate =", value, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateNotEqualTo(Date value) {
            addCriterion("aPubdate <>", value, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateGreaterThan(Date value) {
            addCriterion("aPubdate >", value, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateGreaterThanOrEqualTo(Date value) {
            addCriterion("aPubdate >=", value, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateLessThan(Date value) {
            addCriterion("aPubdate <", value, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateLessThanOrEqualTo(Date value) {
            addCriterion("aPubdate <=", value, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateIn(List<Date> values) {
            addCriterion("aPubdate in", values, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateNotIn(List<Date> values) {
            addCriterion("aPubdate not in", values, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateBetween(Date value1, Date value2) {
            addCriterion("aPubdate between", value1, value2, "apubdate");
            return (Criteria) this;
        }

        public Criteria andApubdateNotBetween(Date value1, Date value2) {
            addCriterion("aPubdate not between", value1, value2, "apubdate");
            return (Criteria) this;
        }

        public Criteria andAreportstartIsNull() {
            addCriterion("aReportStart is null");
            return (Criteria) this;
        }

        public Criteria andAreportstartIsNotNull() {
            addCriterion("aReportStart is not null");
            return (Criteria) this;
        }

        public Criteria andAreportstartEqualTo(String value) {
            addCriterion("aReportStart =", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartNotEqualTo(String value) {
            addCriterion("aReportStart <>", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartGreaterThan(String value) {
            addCriterion("aReportStart >", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartGreaterThanOrEqualTo(String value) {
            addCriterion("aReportStart >=", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartLessThan(String value) {
            addCriterion("aReportStart <", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartLessThanOrEqualTo(String value) {
            addCriterion("aReportStart <=", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartLike(String value) {
            addCriterion("aReportStart like", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartNotLike(String value) {
            addCriterion("aReportStart not like", value, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartIn(List<String> values) {
            addCriterion("aReportStart in", values, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartNotIn(List<String> values) {
            addCriterion("aReportStart not in", values, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartBetween(String value1, String value2) {
            addCriterion("aReportStart between", value1, value2, "areportstart");
            return (Criteria) this;
        }

        public Criteria andAreportstartNotBetween(String value1, String value2) {
            addCriterion("aReportStart not between", value1, value2, "areportstart");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}